package com.nimbus.core.model.proxy;

import com.easy.query.core.proxy.AbstractProxyEntity;
import com.easy.query.core.proxy.SQLSelectAsExpression;
import com.easy.query.core.proxy.fetcher.AbstractFetcher;
import com.nimbus.core.model.Project;
import com.easy.query.core.proxy.columns.types.SQLLongTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLStringTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLBooleanTypeColumn;
import com.easy.query.core.proxy.columns.types.SQLUtilDateTypeColumn;

/**
 * this file automatically generated by easy-query, don't modify it
 * 当前文件是easy-query自动生成的请不要随意修改
 * 如果出现属性冲突请使用@ProxyProperty进行重命名
 *
 * @author easy-query
 */
public class ProjectProxy extends AbstractProxyEntity<ProjectProxy, Project> {

    private static final Class<Project> entityClass = Project.class;

    public static final ProjectProxy TABLE = createTable().createEmpty();

    public static ProjectProxy createTable() {
        return new ProjectProxy();
    }

    public ProjectProxy() {
    }

    /**
     * {@link Project#getId}
     */
    public SQLLongTypeColumn<ProjectProxy> id() {
        return getLongTypeColumn("id");
    }

    /**
     * {@link Project#getCode}
     */
    public SQLStringTypeColumn<ProjectProxy> code() {
        return getStringTypeColumn("code");
    }

    /**
     * 项目代码
     * {@link Project#getName}
     */
    public SQLStringTypeColumn<ProjectProxy> name() {
        return getStringTypeColumn("name");
    }

    /**
     * 项目名称
     * {@link Project#getDescription}
     */
    public SQLStringTypeColumn<ProjectProxy> description() {
        return getStringTypeColumn("description");
    }

    /**
     * 项目描述
     * {@link Project#getOwner}
     */
    public SQLStringTypeColumn<ProjectProxy> owner() {
        return getStringTypeColumn("owner");
    }

    /**
     * 项目负责人
     * {@link Project#getIsActive}
     */
    public SQLBooleanTypeColumn<ProjectProxy> isActive() {
        return getBooleanTypeColumn("isActive");
    }

    /**
     * 是否激活
     * {@link Project#getCreatedAt}
     */
    public SQLUtilDateTypeColumn<ProjectProxy> createdAt() {
        return getUtilDateTypeColumn("createdAt");
    }

    /**
     * 创建时间
     * {@link Project#getCreatedBy}
     */
    public SQLStringTypeColumn<ProjectProxy> createdBy() {
        return getStringTypeColumn("createdBy");
    }


    @Override
    public Class<Project> getEntityClass() {
        return entityClass;
    }


    /**
     * 数据库列的简单获取
     *
     * @return
     */
    public ProjectProxyFetcher FETCHER = new ProjectProxyFetcher(this, null, SQLSelectAsExpression.empty);


    public static class ProjectProxyFetcher extends AbstractFetcher<ProjectProxy, Project, ProjectProxyFetcher> {

        public ProjectProxyFetcher(ProjectProxy proxy, ProjectProxyFetcher prev, SQLSelectAsExpression sqlSelectAsExpression) {
            super(proxy, prev, sqlSelectAsExpression);
        }


        /**
         * {@link Project#getId}
         */
        public ProjectProxyFetcher id() {
            return add(getProxy().id());
        }

        /**
         * {@link Project#getCode}
         */
        public ProjectProxyFetcher code() {
            return add(getProxy().code());
        }

        /**
         * 项目代码
         * {@link Project#getName}
         */
        public ProjectProxyFetcher name() {
            return add(getProxy().name());
        }

        /**
         * 项目名称
         * {@link Project#getDescription}
         */
        public ProjectProxyFetcher description() {
            return add(getProxy().description());
        }

        /**
         * 项目描述
         * {@link Project#getOwner}
         */
        public ProjectProxyFetcher owner() {
            return add(getProxy().owner());
        }

        /**
         * 项目负责人
         * {@link Project#getIsActive}
         */
        public ProjectProxyFetcher isActive() {
            return add(getProxy().isActive());
        }

        /**
         * 是否激活
         * {@link Project#getCreatedAt}
         */
        public ProjectProxyFetcher createdAt() {
            return add(getProxy().createdAt());
        }

        /**
         * 创建时间
         * {@link Project#getCreatedBy}
         */
        public ProjectProxyFetcher createdBy() {
            return add(getProxy().createdBy());
        }


        @Override
        protected ProjectProxyFetcher createFetcher(ProjectProxy cp, AbstractFetcher<ProjectProxy, Project, ProjectProxyFetcher> prev, SQLSelectAsExpression sqlSelectExpression) {
            return new ProjectProxyFetcher(cp, this, sqlSelectExpression);
        }
    }


    public static final class Fields {
        public static final String id = "id";
        public static final String code = "code";
        public static final String name = "name";
        public static final String description = "description";
        public static final String owner = "owner";
        public static final String isActive = "isActive";
        public static final String createdAt = "createdAt";
        public static final String createdBy = "createdBy";

        private Fields() {
        }
    }
}
